LearningStoreJob.DisableFollowingSecurityChecks Method

Disable security checks for the operations added to the job after this call.

Parent Type: LearningStoreJob

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public void DisableFollowingSecurityChecks ()

Example

The following code demands that the user has the "ReadPackageRight" for the package specified by "packageId". If the user has the right, then then the security checks are disabled for the rest of the job. If the user doesn't have the right, then an exception is thrown.

C#
// Create a job
LearningStoreJob job = store.CreateJob();
 
// Create the parameters for the demand
Dictionary<string,object> parameterValues = new Dictionary<string,object>();
parameterValues["PackageId"] = packageId;
 
// Demand the right
job.DemandRight("ReadPackageRight", parameterValues);
 
// Skip security checks for the rest of the job
job.DisableFollowingSecurityChecks();
 
// Add other operations to the job.  No security checks will happen
// on these operations.
 
// Execute the job
job.Execute();